import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('../components/Login.vue')
  },
  {
    path: '/',
    name: 'welcome',
    component: () => import('../views/Welcome.vue')
  },
  {
    path: '/provider',
    name: 'provider',
    component: () => import('../views/Provider.vue')
  },
  {
    path: '/buyinfo',
    name: 'buyinfo',
    component: () => import('../views/BuyInfo.vue')
  },
  {
    path: '/salelist',
    name: 'salelist',
    component: () => import('../components/SaleList.vue')
  },
  {
    path: '/updateprovider',
    name: 'updateprovider',
    component: () => import('../components/UpdateProvider.vue')
  },
  {
    path: '/client',
    name: 'client',
    component: () => import('../views/Client.vue')
  },
  {
    path: '/clientcount',
    name: 'clientcount',
    component: () => import('../views/ClientCount.vue')
  },
  {
    path: '/buy',
    name: 'buy',
    component: () => import('../views/Buy.vue')
  },
  {
    path: '/addsalecargo',
    name: 'addsalecargo',
    component: () => import('../components/AddSaleCargo.vue')
  },
  {
    path: '/sale',
    name: 'sale',
    component: () => import('../views/Sale.vue')
  },
  {
    path: '/logmanager',
    name: 'logmanager',
    component: () => import('../views/LogManager.vue')
  },
  {
    path: '/rolemanager',
    name: 'rolemanager',
    component: () => import('../views/RoleManager.vue')
  },
  {
    path: '/updatepwd',
    name: 'updatepwd',
    component: () => import('../views/UpdatePwd.vue')
  },
  {
    path: '/salecount',
    name: 'salecount',
    component: () => import('../views/SaleCount.vue')
  },
  {
    path: '/saleinfo',
    name: 'saleinfo',
    component: () => import('../views/SaleInfo.vue')
  },
  {
    path: '/storemanager',
    name: 'storemanager',
    component: () => import('../views/StoreManager.vue')
  },
  {
    path: '/usermanager',
    name: 'usermanager',
    component: () => import('../views/UserManager.vue')
  }

]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
